package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;
import java.util.Objects;

/*交付记录*/

@Entity
public class Jiaofujilu {
    private int jlId;//交录id
    private Kehu kH;//客户
    private Timestamp jlTime;//交录时间
    private String jlJieshouren;//对方接收人
    private BigDecimal jlMoney;//交录总金额
    //private String jlBeizhu;//交录备注
    private Dingdan dingdanByDdId;//订单对象（订单id）
    //private Jiaofujihua jiaofujihuaByJjId;//交付计划对象（交付计划id）
    private int jjId;//交付计划id


    private Integer jlYs;//判断是否移除

    public List<Fahuoxiangqing> fahuoxiangqinList;//发货详情集合

    private Huanhuo huanhuoByHhId;//换货对象
    @ManyToOne
    @JoinColumn(name = "hh_id", referencedColumnName = "hh_id")
    public Huanhuo getHuanhuoByHhId() {
        return huanhuoByHhId;
    }

    public void setHuanhuoByHhId(Huanhuo huanhuoByHhId) {
        this.huanhuoByHhId = huanhuoByHhId;
    }


    @Basic
    @Column(name = "jl_ys")
    public Integer getJlYs() {
        return jlYs;
    }

    public void setJlYs(Integer jlYs) {
        this.jlYs = jlYs;
    }

    @Id
    @Column(name = "jl_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getJlId() {
        return jlId;
    }

    public void setJlId(int jlId) {
        this.jlId = jlId;
    }


    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getkH() {
        return kH;
    }

    public void setkH(Kehu kH) {
        this.kH = kH;
    }



    @Basic
    @Column(name = "jl_time", nullable = false)
    public Timestamp getJlTime() {
        return jlTime;
    }

    public void setJlTime(Timestamp jlTime) {
        this.jlTime = jlTime;
    }

    @Basic
    @Column(name = "jl_jieshouren", nullable = true, length = 200)
    public String getJlJieshouren() {
        return jlJieshouren;
    }

    public void setJlJieshouren(String jlJieshouren) {
        this.jlJieshouren = jlJieshouren;
    }

    @Basic
    @Column(name = "jl_money", nullable = true, precision = 2)
    public BigDecimal getJlMoney() {
        return jlMoney;
    }

    public void setJlMoney(BigDecimal jlMoney) {
        this.jlMoney = jlMoney;
    }

   /* @Basic
    @Column(name = "jl_beizhu", nullable = true, length = 200)
    public String getJlBeizhu() {
        return jlBeizhu;
    }

    public void setJlBeizhu(String jlBeizhu) {
        this.jlBeizhu = jlBeizhu;
    }
*/
    @ManyToOne
    @JoinColumn(name = "dd_id", referencedColumnName = "dd_id")
    public Dingdan getDingdanByDdId() {
        return dingdanByDdId;
    }

    public void setDingdanByDdId(Dingdan dingdanByDdId) {
        this.dingdanByDdId = dingdanByDdId;
    }

    @Column(name = "jj_id", nullable = false)
    public int getJjId() {
        return jjId;
    }

    public void setJjId(int jjId) {
        this.jjId = jjId;
    }

   /* @ManyToOne
    @JoinColumn(name = "jj_id", referencedColumnName = "jj_id")
    public Jiaofujihua getJiaofujihuaByJjId() {
        return jiaofujihuaByJjId;
    }

    public void setJiaofujihuaByJjId(Jiaofujihua jiaofujihuaByJjId) {
        this.jiaofujihuaByJjId = jiaofujihuaByJjId;
    }
*/
}
